Mobs As Cellular Automata

 

2006/02/06

 

The greatest weakness of "mobile objects" (mobs) such as creatures and NPCs these days seems to be the depth of their behaviors – that is, the lack of depth. So for a developer whose goal is increasing the dynamism of a game world through its actors, mob AI is probably the point of greatest payoff for effort invested.

 

Maybe looking at some of the details would shed some light on the scope of such an effort. (Is such an effort worth making? Separate question, addressed later. ;-)

 

First of all, mobs in the current batch of MMOGs already seem to be implemented as simple state machines. They just don't have many states:

 

 

To generate more interesting behavior, it would probably be necessary to expand internal states (and transitions between states), available behaviors, and interactions among groups of mobs. It might also be interesting to allow social mobs to have roles.

 

Here are some possibilities for the behaviors of orcs in an orc camp:

 

 

There are tools that could help design behavioral mechanics (I can't bring myself to call that AI, either), such as Deterministic Finite Automata graphs. I suppose these are already being used by some developers.

 

Even with such tools, however, implementing more complex mob behavior still carries some risks:

 

 

Deciding whether to have more dynamic mob behavior has to take those potential costs into account as well. In particular, detecting state change conditions for many mobs could get really nasty. If your conditions aren't well-defined events on which triggers can be applied, then you have to poll for condition changes. That's usually bad news for performance.

 

Systems-level thinking is the only hope for making something like this work. I can't imagine successfully approaching it as an isolated game feature.

 

Finally, there's that pesky question of whether the current very Achiever-oriented population of gamers actually wants a more dynamic world in their game. "Unwanted outcomes" look good to Explorer-types like me, but someone whose satisfaction depends on having a controlled gameplay experience is not likely to agree.